package com.szpt.mo.bhubackground.entity.parameters;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author mo
 * @since 2022-06-05
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "P_UserUpdate", description = "")
public class P_UserUpdate implements Serializable {

    private static final long serialVersionUID = 1L;



    @ApiModelProperty(value = "用户名")
    @Length(max = 128, min = 2, message = "用户名不能少于2位长于128位")
    @Pattern(regexp = "/^[\\u0391-\\uFFE5a-zA-Z·&\\\\s]+$/", message = "用户名格式输入不正确")
    private String name;

    @ApiModelProperty(value = "用户密码")
//    @Length(max = 32, min = 8, message = "密码不能少于8位长于32位")
    private String password;

    @ApiModelProperty(value = "手机号")
    @Pattern(regexp = "/^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\\d{8}$/", message = "手机号码输入有误")
    private String phone;

    @ApiModelProperty(value = "用户头像")
    private String avatar;


}
